function changeFontSize(val)
{
   if(val == '0'){
        $('#detailed_news_cont_p').css('font-size','14px');
	} else {
	    $('#detailed_news_cont_p').css('font-size','20px');
	}
}
$(document).ready(function(){
	var info_id=$("#info_id_hidden").val();
	$.ajax({
	   type: "POST",
	   url: "/templets/html/shop/jsp/content_rating.jsp",
	   data: "info_id="+info_id+"&random="+Math.round(Math.random()*10000),
	   success: function(msg){ 
	    $("#hiddenData").html(""); 
		$("#hiddenData").html(msg);
		$("#total_click").html($("#count_hidden").text());
		$("#total_rating").html($("#total_rating_hidden").text());		
		}
	 });
	 
});

function content_rating(rating,info_id){
	
	if(confirm("确认要评分吗？")){
		$.ajax({
		   type: "POST",
		   url: "/templets/html/shop/jsp/content_rating.jsp",
		   data: "info_id="+info_id+"&rating="+rating+"&random="+Math.round(Math.random()*10000),
		   success: function(msg){		
			 $("#hiddenData").html("");
			 $("#hiddenData").html(msg);
			 
				if($("#is_success").text() == 'true'){
					$("#total_click").html($("#count_hidden").text());
					$("#total_rating").html($("#total_rating_hidden").text());		
				}else if($("#is_success").text() == 'false'){
					alert("今天您已经给该信息评过分了！谢谢！");
				}	
		   }
		 });  
	 }
}



function deKeyWordSearch(){
	if(document.getElementById('seaKeyword').value==''){
		alert('请输入搜索关键字');
		document.getElementById('seaKeyword').focus();
	}else{
		document.detailSearcher.submit();
	}
}
/*
function autoChangeImg(){
	var imgs = document.getElementsByTagName("img");
	for(var i=0;i<imgs.length;i++){
		if(imgs[i].width > 685){
			imgs[i].width = 685;
		}
	}
}
autoChangeImg();
*/
